var oracle = require('oracle');

var connectData = {
    hostname: "192.168.1.32",
    port: 1521,
    database: "AWRREP", // System ID (SID)
    user: "system",
    password: "manager"
}

oracle.connect(connectData, function(err, connection) {
    if (err) { console.log("Error connecting to db:", err); return; }

    connection.execute("select unique DB_NAME, INSTANCE_NAME,DBID from DBA_HIST_DATABASE_INSTANCE", [], function(err, results) {
        if (err) { console.log("Error executing query:", err); return; }

        console.log(results);
        connection.close(); // call only when query is finished executing
    });
});

